package com.flink.api.unit7;

import org.apache.flink.streaming.api.datastream.DataStreamSource;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

/**
 * shuffle
 *
 * @author caizhiyang
 * @since 2024-02-23
 */
public class rebalance_2 {
    public static void main(String[] args) throws Exception {
        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
        env.setParallelism(2);

        DataStreamSource<String> stream = env.socketTextStream("192.168.226.130", 7777);

        stream.rebalance().print();

        env.execute();
    }
}
